In a process of manufacturing a semiconductor device, there is an increasing demand for having a technique of forming a pattern with high aspect ratio. Because the mask pattern used for this process is exposed to etching gas for a long period of time, high resistance to etching is required. To achieve a processed profile with high aspect ratio, there is also a case in which a stacked mask structure is employed for the mask pattern.